package com.xiaomi.service.impl;

import com.xiaomi.entity.ShopSku;
import com.xiaomi.mapper.ShopSkuMapper;
import com.xiaomi.service.ShopSkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @ClassName ShopSpuServiceImpl
 * @Description TODO
 * @Author yp
 * @Date 2021/11/28 12:14
 * @Version 1.0
 **/
@Service
public class ShopSkuServiceImpl implements ShopSkuService {
    @Autowired
    private ShopSkuMapper shopSkuMapper;


    @Override
    public List<ShopSku> selectBySpuId(Integer spuid) {
        return shopSkuMapper.selectBySpuId(spuid);
    }

    @Override
    @Transactional
    public Integer update(ShopSku shopSku) {
        return shopSkuMapper.update(shopSku);
    }

    @Override
    public Integer delete(Integer id) {
        return shopSkuMapper.delete(id);
    }
   /* @Override
    public Integer getCount(String skuName) throws Exception {
        return shopSkuMapper.getCount(skuName);
    }

    @Override
    @Transactional
    public void insert(Map<String, Object> sku) throws Exception {
        shopSkuMapper.insert(sku);
    }

    @Override
    @Transactional
    public void update(Map<String, Object> sku) throws Exception {
        shopSkuMapper.update(sku);
    }

    @Override
    public void delete(Integer id) throws Exception {
        shopSkuMapper.delete(id);
    }*/
}
